package Node;
import org.jdom.*;

public class Gateway {
	private Namespace resURL;
    private Namespace rdfURL;
    private String about;
    private String domain;
    private String URL;
    private String name;
    
    public Gateway(Element root, Namespace resURL, Namespace rdfURL){
    	this.resURL = resURL;
    	this.rdfURL = rdfURL;
    	
    	this.about = root.getChild("Gateway", resURL).getAttributeValue("about", rdfURL);
    	this.domain = root.getChild("Gateway", resURL).getAttributeValue("hasDomain", resURL);
    	this.URL = root.getChild("Gateway", resURL).getAttributeValue("hasURL", resURL);
    	this.name = root.getChild("Gateway", resURL).getAttributeValue("hasName", resURL);
    }
    
    public String getName(){
        return this.name;
    }
    
    public String getURL(){
        return this.URL;
    }
    
    public String getAbout(){
        return this.about;
    }
    
    public String getDomain(){
        return this.domain;
    }
    
    public String toString(){
    	return this.name + " " + this.URL + " " + this.about + " " + this.domain;
    }
}
